package com.twu.bibilioteca;

import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: dixithk
 * Date: 6/20/14
 * Time: 10:09 AM
 * To change this template use File | Settings | File Templates.
 */
public class ListAllMovies implements MenuOperations {
    UserInterface ui = new UserInterfaceApp();
    Library lib = new Library();

    public ListAllMovies(UserInterface Ui , Library lib)
    {
        this.ui = Ui;
        this.lib = lib;

    }


    @Override
    public Result action() {
        ArrayList<Movie> listOfAvailableMovies = lib.getMovies();
        ui.printMovies(listOfAvailableMovies);




        return new Result("Listed Movies\n", true);
    }

    @Override
    public  String getName() {
        return "LIst of Movies";  //To change body of implemented methods use File | Settings | File Templates.
    }
}
